<?php

class Front_Form_ResetPassword extends Zend_Form
{
    public function init() {
        parent::init();
        
        $this->setMethod('post');
        
        $this->setAction('/front/register/change');

        $id = new Zend_Form_Element_Hidden('id');
      
        $password = new Zend_Form_Element_Password('password');  
        $password->setLabel('Password:') 
                ->setAttrib('placeholder', 'password')
                ->setRequired(true)
                ->addValidator('StringLength', false, array(6, 50));
      
        $confirm = new Zend_Form_Element_Password('confirm');  
        $confirm->setLabel('Confirm Password:') 
                ->setAttrib('placeholder', 'confirm password')
                ->setRequired(true)
                ->addValidator('Identical', false, array('token' => 'password'))
                ->addErrorMessage('The passwords do not match');


        $submit = new Zend_Form_Element_Submit('Reset');
        $submit->setLabel('Reset')
                ->setAttribs(array('class'=>'btn btn-primary'))
                ;

        $this->addElement($id)  
                ->addElement($password)
                ->addElement($confirm)
                ->addElement($submit)
                ;

    }
}
